﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MainTemplate.Master" AutoEventWireup="true" CodeBehind="WorKShop.aspx.cs" Inherits="Enterprise.Admin.WorKShop" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="../Content/Widget/fancyBox/jquery.fancybox.pack.js" type="text/javascript" charset="utf-8"></script>
    <script src="../Content/Widget/fancyBox/jquery.mousewheel.pack.js" type="text/javascript" charset="utf-8"></script>
    <script src="../Content/Widget/fancyBox/jquery.easing.pack.js" type="text/javascript" charset="utf-8"></script>
    <link href="../Content/Widget/fancyBox/jquery.fancybox.css" rel="stylesheet" />
    <script src="../Content/Widget/AjaxFileUploader/ajaxfileupload.js" charset="utf-8" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="table_list"></table>
    <div id="search">
        <form id="search_form" action="Handle/GetWorkShopListJson.aspx" method="get">
            <p>
                <label>名称：</label><input type="text" name="CoName" />
            </p>
        </form>
    </div>
    <div id="add">
        <form id="add_form" action="Handle/AddWorkShop.aspx" method="post">
            <p>
                <label>名称：</label><input type="text" name="CoName" value="" />
            </p>
            <p class="en-us">
                <label>名称(En)：</label><input type="text" name="CoNameEn" value="" />
            </p>
            <p>
                <label>排序：</label><input type="text" name="CoSort" value="" />
            </p>
            <p>
                <label>图片：</label><input type="file" id="add_upload" name="Filedata" />
            </p>
            <p>
                <label style="height: 130px; line-height: 130px;">描述：</label><textarea rows="5" cols="30" name="CoDescription"></textarea>
            </p>
            <p>
                <label style="height: 130px; line-height: 130px;">描述(En)：</label><textarea rows="5" cols="30" name="CoDescriptionEn"></textarea>
            </p>
        </form>
    </div>
    <div id="edit">
        <form id="edit_form" action="Handle/EditWorkShop.aspx" method="post">
            <p>
                <label>名称：</label><input type="text" name="CoName" value="" />
                <input id="edit_id" name="CoWorkShopId" type="hidden" value="" />
            </p>
            <p class="en-us">
                <label>名称(En)：</label><input type="text" name="CoNameEn" value="" />
            </p>
            <p>
                <label>排序：</label><input type="text" name="CoSort" value="" />
            </p>
            <p>
                <label>图片：</label><input type="file" id="edit_upload" name="Filedata" />
            </p>
            <p>
                <label style="height: 130px; line-height: 130px;">描述：</label><textarea rows="5" cols="30" name="CoDescription" id="edit_content"></textarea>
            </p>
            <p>
                <label style="height: 130px; line-height: 130px;">描述(En)：</label><textarea rows="5" cols="30" name="CoDescriptionEn"></textarea>
            </p>
        </form>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $.crud({
                tableoption: {
                    title: '先进设备列表',
                    url: 'Handle/GetWorkShopListJson.aspx',
                    onLoadSuccess: function () {
                        $(".fancybox_image").fancybox({
                            'transitionIn': 'none',
                            'transitionOut': 'none',
                            'titlePosition': 'over'
                        });
                    },
                    columns: [[
                             { title: 'Id', field: 'id', width: 280, align: 'center', checkbox: true },
                             { title: '名称', field: 'CoName', width: 280, align: 'center' },
                             { title: '名称(En)', field: 'CoNameEn', width: 280, align: 'center' },
                             { title: '排序', field: 'CoSort', width: 100, align: 'center' },
                             {
                                 field: 'CoNormalImage', title: '图片', width: 80, align: 'center',
                                 formatter: function (value, rowData) {
                                     return '<a class="fancybox_image" name="fancybox_image" href="../upload/workshop/' + rowData.CoNormalImage + '"></a>';
                                 }
                             },
                             {
                                 field: 'opedit', title: '修改', width: 80, align: 'center',
                                 formatter: function () {
                                     return '<a href="javascript:void(0);">修改</a>';
                                 }
                             },
                             {
                                 field: 'opdelete', title: '删除', width: 80, align: 'center',
                                 formatter: function () {
                                     return '<a href="javascript:void(0);">删除</a>';
                                 }
                             }


                    ]]
                },
                isuploadadd: true,
                isuploadedit: true,
                getdetailurl: "Handle/GetWorkShopDetailJson.aspx",
                addajaxoption: {
                    url: "Handle/AddWorkShop.aspx"
                },
                editajaxoption: {
                    url: "Handle/EditWorkShop.aspx"
                },
                deleteajaxoption: {
                    url: "Handle/DeleteWorkShop.aspx"
                },
                bulkdeleteajaxoption: {
                    url: "Handle/WorkShop/BulkDelete.aspx"
                }

            });
        });
    </script>
</asp:Content>

